package com.ruoyi.web.spring.zhs;


import com.ruoyi.web.spring.zhs.service.UserService;
import com.ruoyi.web.spring.zhs.spring.ZhsApplicationContext;

/**
 * @author zhenghuisheng
 * @date 2024/10/28 23:09
 */
public class Test {
    public static void main(String[] args) {
        //创建spring容器以及上下文，在构造方法中扫描全部bean并进行注册
        ZhsApplicationContext applicationContext = new ZhsApplicationContext(AppConfig.class);
        UserService userService = (UserService)applicationContext.getObjectBean("userService");
        userService.test();
    }
}
